//
//  HELFeedbackListCell.m
//  NursingAssociation
//
//  Created by wsj2015 on 2017/3/9.
//  Copyright © 2017年 wsj2015. All rights reserved.
//

#import "HELFeedbackListCell.h"


#import "NSString+Utilities.h"

@implementation HELFeedbackListCell
{
    UIView * snapView;
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPressGuesture:)];
    [self.contentView addGestureRecognizer:longPress];
    
}

- (void)handleLongPressGuesture:(UILongPressGestureRecognizer *)guesture {
//    CGPoint startPoint;
    
    switch (guesture.state) {
            //手势开始
        case UIGestureRecognizerStateBegan:
        {
            NSLog(@"longpress started");
          
            
            if (_cellBlock) {
                _cellBlock();
            }
            
            
            break;
        }
            //手势移动
        case UIGestureRecognizerStateChanged: {
                      break;
        }
            //手势结束
        case UIGestureRecognizerStateEnded: {
                   }
        default:
            break;
    }
}


- (void)setModel:(HELFeedBackModel *)model{
  
    self.my_contentL.text = model.content;
    self.my_dateL.text = [NSString timeToString:[model.createTime longLongValue]];
    
    if (!model.replyTime || [model.replyTime isKindOfClass:[NSNull class]]) {
        self.statusL.text = @"未回复";
        self.reply_dateL.text = @"";
        self.repllyL.text = @"您的反馈我们已收到,将尽快给您回复!";
        self.repllyL.textColor = kPinchColor;
        
    }else{
        self.statusL.text = @"已回复";
        self.reply_dateL.text = [NSString timeToString:[model.replyTime longLongValue]];;
        self.repllyL.text = model.replyContent;
        self.repllyL.textColor = kTxtColor;
    }
    
    
    
 
}

@end
